// Omit<Type, Keys>
// 从Type类型中删除，键名和 Keys 的字符串联合类型 相同的项，生成新的对象类型
interface Todo {
    title: string;
    description: string;
    completed: boolean;
    createdAt: number;
  }
   
  type TodoPreview = Omit<Todo, "description">;
   
  const todo: TodoPreview = {
    title: "Clean room",
    completed: false,
    createdAt: 1615544252770,
  };
  type TodoInfo = Omit<Todo, "completed" | "createdAt">;
   
  const todoInfo: TodoInfo = {
    title: "Pick up kids",
    description: "Kindergarten closes at 5pm",
  };
   
     export {}
     type dada = "a" extends keyof any? true :false // keyof any (任意的联合类型)，包含所有的联合类型
     type omit<T, K extends keyof any> = {
        [P in Exclude<keyof T,K>] : T[P]
     }
    //  简化版
    type omit1<T,K extends keyof any>  = Pick<T,Exclude<keyof T,K>>
     type daw = omit<{a:string,b:number},'a'>